package com.atguigu.srb.core.service;

import com.atguigu.srb.core.pojo.entity.Lend;
import com.atguigu.srb.core.pojo.entity.vo.BorrowInfoApprovalVO;
import com.atguigu.srb.core.pojo.entity.vo.LendInfoVO;
import com.atguigu.srb.core.pojo.entity.vo.LendSearchVO;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 标的准备表 服务类
 * </p>
 *
 * @author Atguigu
 * @since 2024-10-11
 */
public interface LendService extends IService<Lend> {

    Boolean updateInvestAmountAndNum(String agentProjectCode, String voteAmt);

    void createLend(BorrowInfoApprovalVO borrowInfoApprovalVO);

    List<Lend> getLends();

    LendInfoVO getLendInfoVOById(Long id);

    Page<Lend> getLendsByCondition(LendSearchVO lendSearchVO, Integer pageNum, Integer pageSize);

    BigDecimal income(BigDecimal amount, BigDecimal lendYearRate, Integer period, Integer returnMethod);

    void makeLoan(Long id);
}
